<%-- 
    Document   : content
    Created on : Oct 21, 2011, 10:42:29 AM
    Author     : Mr.Thanh
--%>

<%@page import="java.util.Iterator"%>
<%@page import="java.util.Vector"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.ArrayList"%>
<%@page import="model.dao.administratorDAO"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
  String table=request.getParameter("page");   
  HashMap<Vector,ArrayList<String>> dsAll;
  if(table!=null)
  {
      
      dsAll=(HashMap<Vector,ArrayList<String>>)request.getAttribute("DanhSach");
      if(dsAll!=null&&dsAll.size()>0){
         
         %>                  
                       
            <div class="boxDisplay">   
                 <form id="frmDatabase" name="frmDatabase" method="post" action="change">
                 <input name="btnTable" type="hidden" value="<%=table%>"/></td>
              <table width="100%">                
                  
                  <tr>
                  <td class="boxDisplay_ColAction"><input type="checkbox" name="chkDatabase" id="chkDatabase"></td>    
                  <td class="boxDisplay_ColAction" ></td>
                  <td class="boxDisplay_ColAction" ></td>
                       
                  <%
                  
                  Iterator iterator = dsAll.keySet().iterator();
                  //get key
                  Vector vt=(Vector)iterator.next();
                  //get value
                  ArrayList<String> tbls=dsAll.get(vt);                  
                  for(String s:tbls){
                      %>
                     <td><strong><%=s%></strong></td>
                  <%
                  }
                %>                  
                                 
                </tr>
<%
           iterator = dsAll.keySet().iterator();
           while(iterator.hasNext()){
               vt=(Vector)iterator.next();
                
          %>
                <tr>
                  <td class="boxDisplay_ColAction"><input type="checkbox" name="chkId" value="<%=vt.get(0)%>"></td>
                  <td class="boxDisplay_ColAction" ><a class="ajaxAction LienKet[page=<%=vt.get(0).toString()%>&action=view]" title=""><img src="images/browse.png" alt="Browse" width="16" height="16"></a></td>
                  <td class="boxDisplay_ColAction" ><a class="ajaxAction LienKet[page=<%=vt.get(0).toString()%>&action=struct]" title=""><img src="images/struct.png" alt="Struct" width="16" height="16"></a></td>
                 
                  <%
                  
                  for(int i=0;i<vt.size();i++){%>
                       <td><%=vt.get(i)%></td>   
                  <%}%>
                </tr>
                <%                    
           }
          %>
          </table>        
                 </form>
        </div>
<%
      }      
      
  }
  %>